package org.example;

import org.example.pojo.Person;
import org.kie.api.KieServices;
import org.kie.api.runtime.KieContainer;
import org.kie.api.runtime.KieSession;

/**
 * Hello world!
 */
public class App {
    public static void main(String[] args) {

        KieServices ks = KieServices.Factory.get();
        KieContainer kc = ks.getKieClasspathContainer();
        KieSession kieSession = kc.newKieSession("kieSession");

        Person p = new Person();
        p.setAge(30);
        kieSession.insert(p);
        int i = kieSession.fireAllRules();
        kieSession.dispose();
        System.out.println("Hello World!");
    }
}
